using System.Collections;
using System.Collections.Generic;
using QFramework;
using UnityEngine;

namespace AsterroidX
{
    public class CacheBulletCmd : AbstractCommand
    {
        public Bullet Bullet;

        public CacheBulletCmd(Bullet bullet)
        {
            Bullet = bullet;
        }
        protected override void OnExecute()
        {
           var gameModel=this.GetModel<GameModel>();

            gameModel.BulletCount--;

            Bullet.Hide();

            gameModel.CacheBullet.Enqueue(Bullet);

        }
    }
}
